<template>    
    <slot :row="data">{{ text }}</slot>    
</template>
<script lang="ts">
import {ref} from 'vue'
export default {   
    props: {
        label: {
            type: String,
            default: ()=>('')
        },
        prop: {
            type: String,
            default: ()=>('')
        },                
        data: {
            type: Object,
            default: ()=>(null)
        },
        width: {
            type: [Number, String],
            default: ()=>('')
        }
    },
    setup(props){
        let text = ref(null)
        if (props.prop && props.data) {
            text.value = props.data[props.prop]
        }
        return {
            text
        }
    },
    mounted() {
       
    }
}

</script>